Doomsday rule

John Conway, inventor of the Doomsday algorithm

The Doomsday rule, Doomsday algorithm or Doomsday method is an algorithm of determination of the day of the week for a given date. It provides a perpetual calendar because the Gregorian calendar moves in cycles of 400 years. The algorithm for mental calculation was devised by John Conway in 1973,[1][2] drawing inspiration from Lewis Carroll's perpetual calendar algorithm.[3][4][5] It takes advantage of each year having a certain day of the week upon which certain easy-to-remember dates, called the doomsdays, fall; for example, the last day of February, 4/4, 6/6, 8/8, 10/10, and 12/12 all occur on the same day of the week in any year.

Applying the Doomsday algorithm involves three steps: determination of the anchor day for the century, calculation of the anchor day for the year from the one for the century, and selection of the closest date out of those that always fall on the doomsday, e.g., 4/4 and 6/6, and count of the number of days (modulo 7) between that date and the date in question to arrive at the day of the week. The technique applies to both the Gregorian calendar and the Julian calendar, although their doomsdays are usually different days of the week.

The algorithm is simple enough that it can be computed mentally. Conway could usually give the correct answer in under two seconds. To improve his speed, he practiced his calendrical calculations on his computer, which was programmed to quiz him with random dates every time he logged on.[6]

  1. ^ John Horton Conway, "Tomorrow is the Day After Doomsday" (PDF). Eureka. October 1973. p. 28-32.
  2. ^ Richard Guy, John Horton Conway, Elwyn Berlekamp : "Winning Ways: For Your Mathematical Plays, Volume. 2: Games in Particular", pages 795–797, Academic Press, London, 1982, ISBN 0-12-091102-7.
  3. ^ Lewis Carroll, "To Find the Day of the Week for Any Given Date", Nature, March 31, 1887. doi:10.1038/035517a0
  4. ^ Martin Gardner, The Universe in a Handkerchief: Lewis Carroll's Mathematical Recreations, Games, Puzzles, and Word Plays, pages 24–26, Springer-Verlag, 1996.
  5. ^ "What Day is Doomsday". Mathematics Awareness Month. April 2014.
  6. ^ Alpert, Mark (1999-04-01). "Not Just Fun and Games". Scientific American. Retrieved 2024-04-18.

© MMXXIII Rich X Search. We shall prevail. All rights reserved. Rich X Search